package com.thl.common;

import com.thl.common.enums.ErrorCodeEnum;
import org.apache.commons.lang3.StringUtils;

/**
 * @author 1900614@qq.com
 * @version 1.0
 * @date 2021/6/19 18:14
 */
public class MyExcetion extends RuntimeException {
    protected String code;
    protected String message;
    public MyExcetion(String code, String message) {
        StringUtils.isNoneBlank(code);
        this.code = code;
        this.message = message;
    }
    public MyExcetion(ErrorCodeEnum code, String message) {

        this.code = code.name();
        this.message = message;
    }
}
